package com.paomi.client.net;

import java.util.Date;

/**
 * Created by pc on 2018/10/24
 * Describe:请求地址的控制
 * Base	基础服务	http://dev.base.opentickets.cn
 * User	用户服务	http://dev.user.opentickets.cn
 * Ticket	票务服务	http://dev.ticket.opentickets.cn
 * Login	登录服务	http://dev.login.opentickets.cn
 * Pay	支付服务	http://dev.pay.opentickets.cn
 * com.paomi.client.net
 */
public class Constants {
    /** Api地址*/
    private static int TYPE =2;//1开发，2是测试，3是本地
    /** Api地址*/
    public static String BASE_URL = "";
    public static String Login_URL = "";
    public static String User_URL = "";
    public static String Ticket_URL = "";
    public static String Pay_URL = "";
    public static String HTML_SEAT_URL = "";//加载在线选座的页面
    public static String HTML_INVITATION = "";//邀请链接的复制

    /**
     * 测试环境
     * 服务名	备注	IP
     * Base	基础服务	http://test.base.opentickets.cn
     * User	用户服务	http://test.user.opentickets.cn
     * Ticket	票务服务	http://test.ticket.opentickets.cn
     * Login	登录服务	http://test.login.opentickets.cn
     * Pay	支付服务	http://test.pay.opentickets.cn
     */

    static {
        switch (TYPE) {
            case 1:
                BASE_URL = "http://dev.base.opentickets.cn/";
                User_URL = "http://dev.user.opentickets.cn/";
                Ticket_URL = "http://dev.ticket.opentickets.cn/";
                Login_URL = "http://dev.login.opentickets.cn/";
                Pay_URL = "http://dev.pay.opentickets.cn/";
                HTML_SEAT_URL = "http://dev.h5.opentickets.cn/svgseattest.html?";
                HTML_INVITATION = "http://dev.h5.opentickets.cn/invitation.html?";
                break;
            case 2:
                BASE_URL = "http://test.base.opentickets.cn/";
                User_URL = "http://test.user.opentickets.cn/";
                Ticket_URL = "http://test.ticket.opentickets.cn/";
                Login_URL = "http://test.login.opentickets.cn/";
                Pay_URL = "http://test.pay.opentickets.cn/";
                HTML_SEAT_URL = "http://test.h5.opentickets.cn/svgseattest.html?";
                HTML_INVITATION = "http://test.h5.opentickets.cn/invitation.html?";
                break;
            case 3:
//                base: http://10.1.100.149:8081/
//                cms: http://10.1.100.149:8083/
//                ticket: http://10.1.100.149:8082/
//                user: http://10.1.100.149:8080/
//                pay: http://10.1.100.149:8088/
//                login: http://10.1.100.149:9999/
                BASE_URL = "http://10.1.100.149:8081/";
                User_URL = "http://10.1.100.149:8080/";
                Ticket_URL = "http://10.1.100.149:8082/";
                Login_URL = "http://10.1.100.149:9999/";
                Pay_URL = "http://10.1.100.149:8088/";
                HTML_SEAT_URL = "http://dev.h5.opentickets.cn/svgseattest.html?";
                HTML_INVITATION = "http://dev.h5.opentickets.cn/invitation.html?";
                break;
        }
    }
    /** 服务器时间*/
    public static Date sServerDate = new Date();
    /** 分页数*/
    public static final int PAGE_SIZE = 10;
    //微信商户号id
    public static final String APP_ID="wx567b758566daee6c";
    public static int BASE = 100000;
    /**
     * 支付成功code
     */
    public static final int wxSuccess = BASE + 1;
    /**
     *支付失败code
     */
    public static final int wxFailure = BASE + 2;
    /**
     *支付取消code
     */
    public static final int wxCancel = BASE + 3;
}
